﻿namespace RL
{
    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Windows.Forms;

    public class fEditorLongString : System.Windows.Forms.Form
    {
        internal Button btnCancel;
        internal Button btnOK;
        private IContainer components;
        private static fEditorLongString Form = new fEditorLongString();
        internal TextBox TextBox1;

        public fEditorLongString()
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public static void Edit(ref RL.MultiLineString InputValue)
        {
            Form.MultiLineString = InputValue.Value;
            if (Form.ShowDialog() == DialogResult.OK)
            {
                InputValue.Value = Form.MultiLineString;
            }
        }

        public static void Edit(ref RL.MultiLineString InputValue, string Title)
        {
            Form.Text = Title;
            Edit(ref InputValue);
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            this.btnOK = new Button();
            this.btnCancel = new Button();
            this.TextBox1 = new TextBox();
            base.SuspendLayout();
            this.btnOK.DialogResult = DialogResult.OK;
            this.btnOK.Location = new Point(0xd8, 0x88);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new Size(0x4b, 0x17);
            this.btnOK.TabIndex = 0;
            this.btnOK.Text = "OK";
            this.btnCancel.DialogResult = DialogResult.Cancel;
            this.btnCancel.Location = new Point(0x128, 0x88);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new Size(0x4b, 0x17);
            this.btnCancel.TabIndex = 1;
            this.btnCancel.Text = "Cancel";
            this.TextBox1.Location = new Point(8, 8);
            this.TextBox1.Multiline = true;
            this.TextBox1.Name = "TextBox1";
            this.TextBox1.Size = new Size(360, 120);
            this.TextBox1.TabIndex = 2;
            this.AutoScaleBaseSize = new Size(5, 13);
            base.CancelButton = this.btnCancel;
            base.ClientSize = new Size(0x178, 0xa6);
            base.Controls.Add(this.TextBox1);
            base.Controls.Add(this.btnCancel);
            base.Controls.Add(this.btnOK);
            base.Name = "fEditorLongString";
            this.Text = "Long String Editor";
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        public string MultiLineString
        {
            get
            {
                return this.TextBox1.Text;
            }
            set
            {
                this.TextBox1.Text = value;
            }
        }
    }
}

